package com.itheima.demo;

import com.itheima.domain.Student;

/**
 * @author Zhang_Han
 * @version 1.0
 * @date 2020/7/17 11:31
 */
@SuppressWarnings("all")
public class Demo_002 {
    public static void main(String[] args) throws ClassNotFoundException {
        //第一种方式获取class文件;
        Class clazz = Class.forName("com.itheima.domain.Student");

        //第二种方式获取class文件;
        Class clazz1 = Student.class;

        //第三种获取class文件;

        Student stu = new Student();
        Class clazz2 = stu.getClass();

        System.out.println(clazz);
        System.out.println(clazz1);
        System.out.println(clazz2);

        System.out.println(clazz == clazz1);
        System.out.println(clazz1 == clazz2);
    }
}
